<div id="primary">
<h1>Configuring your browser for Queriac</h1>
<p>
	This page will help you get your browser set up for use with Queriac. Once you're setup, check our <%= link_to 'tutorial', static_page_path('tutorial')%> to learn about commands, bookmarklets and options. 
	For a more verbose explanation of Queriac and its various capabilities, visit the <%= link_to "help page", static_page_path('help') %>.
</p>	


<h2 class="browser_header firefox">Firefox (All recent PC, Mac, and Linux versions)</h2>

<% if logged_in? %>
<h3>Option A: Add Queriac to Firefox's Search Bar</h3>
<ol class="normal">
	<a href="#" onclick="javascript:addp('<%= opensearch_user_url(current_user) %>');"><%= image_tag "screenshots/firefox_opensearch_screenshot.png" %></a>
	<li><a href="#" onclick="javascript:addp('<%= opensearch_user_url(current_user) %>');">Click here to install Queriac in your search bar.</a></li>
</ol>

<h3>Option B: Add Queriac to Firefox's Address Bar (Location Bar)</h3>
<% end %>

<ol class="normal">
	<li>Open Firefox and type <code>about:config</code> in the address bar. You may get a warning about being careful. That's fine. Carry on. This will open up a big list of browser preferences.</li>
	<li>In the filter field, type <code>keyword</code>. This should filter the list down to just a couple of items.</li>
	<li>Make sure <code>keyword.enabled</code> is set to <code>true</code></li>
	<li>
		Set <code>keyword.URL</code> to 
		<%= logged_in? ? "<code>#{user_home_url(current_user)}/</code>" : "<code>#{user_home_url('youraccountname')}/</code>, using your account name of course." %> 
		<b>Don't forget the trailing slash!</b>
	</li>
	<li>
		That's it. Visit your account page at 
		<%= logged_in? ? link_to(user_home_url(current_user), current_user.login) : "<i>#{user_home_url('youraccountname')}</i>" %>
		to start adding commands.
	</li>
</ol>


<h2 class="browser_header ie7">Internet Explorer 7</h2>
<p>Microsoft provides a website with a nice little form for adding search providers. Installing Queriac is just a matter of copy and paste..</p>

<ol class="normal">
	<li>
		Copy the following text (including the <i>TEST</i> part): 
		<%= logged_in? ? "<code>#{user_home_url(current_user)}/TEST</code>" : "<code>#{user_home_url('youraccountname')}/TEST</code>, using your account name of course." %> 
	</li>
	<li>Visit Microsoft's <%= nofollow_link_to "Add Search Providers to Internet Explorer", "http://www.microsoft.com/windows/ie/searchguide/en-en/default.mspx" %> page and paste the URL you just copied into the form.</li>
	<li>Note: You may get a warning saying that your default search will be "switched away from Google" (Side Note: I wonder how much Google paid Microsoft for that alert.. More on that <%= nofollow_link_to "here", "http://blogs.zdnet.com/BTL/?p=6715" %>). Anyway, do this:</li>
</ol>
<%= image_tag "screenshots/ie_opensearch_changed_from_google.png" %>


<!--
<h2 class="browser_header ie6">Internet Explorer 6</h2>
<p>Coming soon!</p>
-->

<h2 class="browser_header safari">Safari 3+ on Mac OS X</h2>
<p>Apple is <%= nofollow_link_to "in bed with Google", "http://blogs.zdnet.com/BTL/?p=5356" %> in terms of the Safari search bar, 
	so configuring Safari for Queriac requires a little finagling, but it's still pretty easy. 
	You'll need to install <%= nofollow_link_to "Keywurl", "http://purefiction.net/keywurl/" %>, a free <%= nofollow_link_to "SIMBL", "http://www.culater.net/software/SIMBL/SIMBL.php" %> plugin that lets you customize Safari's address bar.</p>

<ol class="normal">
	<li><%= nofollow_link_to "Download and install Keywurl", "http://purefiction.net/keywurl/" %> (you may have to download install <%= nofollow_link_to "SIMBL", "http://www.culater.net/software/SIMBL/SIMBL.php" %> too).</li>
	<li>Once Keywurl is installed open up Safari's preferences and click Keywurl</li>
	<li>Delete all of Keywurl's pre-installed keywords, except for <code>default</code>. You won't be needing them.</li>
	<li>
		Edit the <code>default</code> keyword, and paste the following: 
		<%= logged_in? ? "<code>#{user_home_url(current_user)}/$$$</code>" : "<code>#{user_home_url('youraccountname')}/$$$</code>, using your account name of course." %> 
	</li>
	<% if logged_in? %>
	<li>
		If you also want to use Queriac's bookmarklet features (which you should), you'll need to add another keyword to Keywurl. Give it a keyword of <code>j</code>
		and use the following paste the following in the 'expansion' field: 
		<code>javascript:_s=document.createElement('script');_s.type='text/javascript';_s.src='<%= user_home_url(current_user) %>/@@@';document.getElementsByTagName('head')[0].appendChild(_s);void(0);</code>
	</li>
	<% end %>
</ol>

<h2 class="browser_header opera">Opera (All recent versions)</h2>
<p>In the days before Firefox, Opera was the coolguy browser, with lots of innovative features that were ahead their time.
	In fact, Opera may have been the first browser to featured the keyworded search concepts that make Queriac possible! Anyhow, the following instructions are for 
	Opera 9, but the process is probably about the same for older versions..</p>

<ol class="normal">
	<li>Open Opera's preferences and click on 'Search'.</li>
	<li>Add a new search and fill it out like the screenshot below (using your username instead of 'zeke').</li>
	<li>Note: You should probably delete the other searches in the list so they don't conflict with the keywords of your Queriac commands.</li>
</ol>

<%= image_tag "screenshots/opera_opensearch.png" %>
	

<h2 class="browser_header camino">Camino (All recent versions)</h2>

<% if logged_in? %>

<h3>Option A: Add Queriac to Camino's Search Bar (Camino 1.6+)</h3>

<ol class="normal">
	<li><a href="#" onclick="javascript:addp('<%= opensearch_user_url(current_user) %>');">Click here to install Queriac in your search bar.</a></li>
	<li>Note: Camino will revert back to Google when you restart it. To set Camino's search bar to default to Queriac, click the magnifying glass icon on the left of the search bar, then click <i>'Manage Search Engines..'</i></li>
	<li>From here it's easy:</li>
</ol>

<%= image_tag "screenshots/camino_opensearch_make_default.png" %>

<h3>Option B: Add Queriac to Camino's Address Bar (Location Bar)</h3>
<% end %>


<ol class="normal">
	<li>Open Camino and type <code>about:config</code> in the address bar. You may get a warning about being careful. That's fine. Carry on. This will open up a big list of browser preferences.</li>
	<li>In the filter field, type <code>keyword</code>. This should filter the list down to just a couple of items.</li>
	<li>Set <code>keyword.enabled</code> to <code>true</code>.</li>
	<li>
		Set <code>keyword.URL</code> to 
		<%= logged_in? ? "<code>#{user_home_url(current_user)}/</code>" : "<code>#{user_home_url('youraccountname')}/</code>, using your account name of course." %> 
		<b>Don't forget the trailing slash!</b>
	</li>
	<li>
		That's it. Visit your account page at 
		<%= logged_in? ? link_to(user_home_url(current_user), current_user.login) : "<i>#{user_home_url('youraccountname')}</i>" %>
		to start adding commands.
	</li>
</ol>
</div>